package edu.uw.tcss360.group6.gui.DataCards;

import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import edu.uw.tcss360.group6.gui.Actions.*;

import javax.swing.*;


/**
 * Created with IntelliJ IDEA.
 * edu.uw.tcss360.group6.model.User: Lemtzas
 * Date: 2/20/13
 * Time: 9:46 PM
 * To change this template use File | Settings | File Templates.
 */
@SuppressWarnings("serial")
public class ContestantCard extends DataCard {
	private final JButton Submission;
	

    public ContestantCard() {
        super("Login");
        this.add(new JButton(new LogoutAction()));
        this.add(new SpacerPanel());
        
        this.add(new JButton(new BackAction()));
        this.add(new JButton(new HomeAction()));
        Submission  = new JButton(new WeavingDraftSubmissionAction());
        Submission.setEnabled(false);
        this.add(Submission);
    }
   
    public void enableSubmission()
    {
    	Submission.setEnabled(true);
    }
    public void disableSubmission()
    {
    	Submission.setEnabled(false);
    }
    public BufferedImage createImage(JPanel panel) {

        int w = panel.getWidth();
        int h = panel.getHeight();
        BufferedImage bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
        Graphics2D g = bi.createGraphics();
        panel.paint(g);
        return bi;
    }
    	 
    
}
